﻿using System.Web.Mvc;
using Vit.Web.Mvc.Results;

namespace Vit.Web.Mvc.Filters
{
    public abstract class FeedResultActionFilter : IActionFilter
    {
        private string feedType;

        public FeedResultActionFilter(string feedType)
        {
            this.feedType = feedType;
        }

        #region IActionFilter Members

        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
            filterContext.Result = new PartialFeedResult(feedType, false);
        }

        public void OnActionExecuting(ActionExecutingContext filterContext)
        {
        }

        #endregion
    }
}
